<?php
  //     $path="E:\\001tools\SublimeText3x86\Data\Packages\User\dm_kw";//平行
  //     $path="D:\\tools\SublimeText3x86\Data\Packages\User"; //手提mayun tengteng huatenga yy
  $path="D:\\tools\sublime\sublime3\Data\Packages\User\dm_kw";  //启着
  $arr=[
    ["limit","极限"],
    ["per_page","每页"],
    ["create_time","创建时间"],
    ["update_time","更新时间"],
    ["status","状态"],
    ["vaild","有效"],
    ["contorller","控制器"],
    ["localhost","本地域名"],
    ["database","数据库"],
    ["config","配置"],
    ["model","模型"],
    ["application","应用"],
    ["return","返回"],
    ["cache","缓存"],
    ["password","密码"],
    ["prefix","前缀"],
    ["namespace","命名空间"],
    ["public","公共"],
    ["private","私有"],
    ["protected","保护"],
    ["default","默认"],
    ["fetch","fetch"],
    ["success","成功"],
    ["error","错误"],
    ["empty","空"],
    ["server","服务"],
    ["request","请求"],
    ["blog","博客"],
    ["widget","小部件"],
    ["domain","域名"],
    ["file","文件"],
    ["folder","文件夹"],
    ["param","参数"],
    ["session","session"],
    ["cookie","cookie"],
    ["delete","delete"],
    ["submit","提交"],
    ["charset","字符集"],
    ["query","询问"],
    ["where","where"],
    ["connect","连接"],
    ["select","select"],
    ["table","table"],
    ["between","之间"],
    ["field","字段"],
    ["group","组"],
    ["alias","别名"],
    ["timestamp","时间戳"],
    ["template","模板"],
    ["trace","调试追踪"],
    ["captcha","验证码"],
    ["verify","验证"],
    ["function","function"],
    ["word","单词"],
    ["keyword","关键词"],
    ["world","世界"],
    ["search","搜索"],
    ["common","共同"],
    ["number","号码"],
    ["windows","窗口"],
    ["region","区域"],
    ["province","省份"],
    ["city","城市"],
    ["county","村"],
    ["address","地址"],
    ["advertises","招聘"],
    ["validation","验证"],
    ["jquery","jq"],
    ["ignore","忽略"],
    ["RegExp","正则"],
    ["match","正则:匹配/比赛"],
    ["pattern","正则:表达式/模式"],
    ["exec","正则:匹配第一个"],
    ["methods","方法"],
    ["asc","升序"],
    ["desc","升序"],
    ["notice","注意/公告"],
    ["shadow","阴影"],
    ["options","选项"],
    ["rendering","渲染"],
    ["filter","过滤"],
    ["split","分割"],
    ["activity","活动"],
    ["scroll","滚动"],
    ["random","随机"],
    ["gradient","渐变|梯度"],
    ["linear","线性"],
    ["stroke","svg边框/划"],
    ["symbol","符号"],
    ["layout","布局"],
    ["container","容器"],
    ["reverse","反转/反向"],
    ["assets","资产"],
    ["value","值"],
    ["label","标签"],
    ["before","之前"],
    ["after","之后"],
    ["previous","上一个"],
    ["prev","上一个[缩]"],
    ["next","下一个"],
    ["solid","实体"],
    ["dashed","虚线/冲"],
    ["dotted","点线"],
    ["background","背景"],
    ["ranking","排名"],
    ["signup","报名"],
    ["mock","模拟"],
    ["keyboard","键盘"],
    ["mouse","鼠标"],
    ["animation","动画"],
    ["sublime","编缉器"],
    ["square","方形"],
    ["right","右"],
    ["left","左"],
    ["center","左右居中"],
    ["middle","上下居中"],
    ["align","排列"],
    ["height","高"],
    ["watch","监听"],
    ["converts","转换"],
    ["composer","设计者"],
    ["include","引入"],
    ["gift","礼物"],
    ["length","长度"],
    ["year","年"],
    ["month","月"],
    ["day","日"],
    ["hour","时"],
    ["minute","分"],
    ["second","秒"],
    ["copyright","版权"],
    ["voice","声音"],
    ["video","视频"],
    ["tecent","腾讯"],
    ["youku","优酷"],
    ["taobao","淘宝"],
    ["zhihu","知乎"],
    ["aliyun","阿里云"],
    ["tmall","天猫"],
    ["description","描述"],
    ["desc","描述缩写"],
    ["profile","简介"],
    ["blur","失焦点"],
    ["focus","得焦点"],
    ["change","改变"],
    ["mouseover","移入"],
    ["mouseout","移出"],
    ["mousemove","移动"],
    ["mousedown","按下"],
    ["mouseup","按下松开"],
    ["click","单击"],
    ["dblclick","双击"],
    ["keydown","键下"],
    ["keyup","键下松开"],
    ["keypress","回车按下"],
    ["submit","表单提交"],
    ["load","加载"],
    ["unload","卸载"],
    ["dynamic","动态"],
    ["people","人"],
    ["circle","圈子"],
    ["example","例子"],
    ["corner","角标"],
    ["pink","粉红色"],
    ["orange","橙色"],
    ["gray","orange"],
    ["white","白色"],
    ["black","黑色"],
    ["violet","紫色"],
    ["green","绿色"],
    ["red","红色"],
    ["yellow","黄色"],
    ["blue","蓝色"],
    ["brown","棕色"],
    ["release","发布"],
  ];
  function fileCreateUtf8($path,$content){
    $f=fopen($path, "wb");
    $text="\xEF\xBB\xBF".$content;
    fputs($f, $text);
    fclose($f);
  }
  $rkh=']]';
  for ($i=0; $i <count($arr); $i++) {
    $snippet='<snippet>
                <content><![CDATA['.$arr[$i][0].''.$rkh.'></content>
                <tabTrigger>'.$arr[$i][0].'</tabTrigger>
                <description>kw:'.$arr[$i][1].'</description>
              </snippet>';
    fileCreateUtf8($path."\\".$arr[$i][0].'.sublime-snippet',$snippet);
  }
 ?>